Skip to content

fix: Cache dynamic proxy classes created by ByteBuddy #2129

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 5 commits into from
Mar 4, 2024

Conversation

mykola-mokhnach
Copy link
Contributor

@mykola-mokhnach mykola-mokhnach commented Mar 2, 2024

Change list

I assume I've finally found the reason for the extensive memory usage described in #2119

Each proxy class created by ByteBuddy gets automatically cached by the
given class loader. It is important to have a custom cache in order to improve
the performance and to avoid extensive memory usage for our case, where
the amount of instrumented proxy classes we create is low in comparison to the amount
of proxy instances.

Types of changes

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@mykola-mokhnach mykola-mokhnach merged commit 6144fb2 into master Mar 4, 2024
@mykola-mokhnach mykola-mokhnach deleted the proxy_cls_cache branch March 4, 2024 14:47
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: AppiumFieldDecorator: Memory leak after moving from java-client 8.5.0 to 8.5.1 .... 9.1.0
2 participants